package server.model.players;

import server.model.players.Client;

public class KillChecker {
	
	public Client c;
	
	public KillChecker(Client c) {
		this.c = c;
	}
	
	public int currentSlot = -1;
	
	public boolean addKill(Client victim) {
		String n = victim.playerName;
		String i = victim.connectedFrom;
		if (n.equalsIgnoreCase(c.killOneName) || n.equalsIgnoreCase(c.killTwoName) || n.equalsIgnoreCase(c.killThreeName)) {
		System.out.println("shouldnt get drops1");
			return false;
		} else
		if (i.equalsIgnoreCase(c.killOneIp) || i.equalsIgnoreCase(c.killTwoIp) || i.equalsIgnoreCase(c.killThreeIp)) {
		System.out.println("shouldnt get drops2");
			return false;
		} else {
			currentSlot++;
			if (currentSlot > 3) {
				currentSlot = 0;
			}
			if (currentSlot == 1) {
				c.killOneName = n;
				c.killOneIp = i;
			}
						if (currentSlot == 2) {
				c.killTwoName = n;
				c.killTwoIp = i;
			}
						if (currentSlot == 3) {
				c.killThreeName = n;
				c.killThreeIp = i;
			}
		}
		return true;
	}
}
